<%@ page import="java.util.Enumeration" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/12/5 0005
  Time: 17:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
        #left,#right{
            float: left;
        }
        #left{
            width: 140px;
        }
        #left li{
            list-style: none;
        }
        #left a{
            text-decoration: none;
        }
    </style>
</head>
<body>
<h1>
    <%
        String o=(String)session.getAttribute("USER_LOGIN");
        if(o==null){
            out.print("<script>alert('你翻窗户进来的？');location.replace('login.jsp');</script>");
            return;
        }
    %>
</h1>
<div id="left">
    <ul>
        <li><a href="students.html" target="mainFrame">学生</a> </li>
       <%-- <li><a href="student.jsp" target="mainFrame">学生</a> </li>--%>
        <li><a href="?" target="mainFrame">课程</a> </li>
        <li><a href="gradeServlet" target="mainFrame">年级</a> </li>
        <li><a href="">成绩</a> </li>
        <li><a href="sayHi">servlet演示</a> </li>
        <li><a>退出</a></li>
    </ul>
</div>
<div id="right">
    <iframe name="mainFrame" src="my.jsp" frameborder="0" width="800px" height="700px"></iframe>
</div>
    <%--<a href="student.jsp">查看学生</a>
    <!-- 不通过login.jsp正确输入，不允许访问-->
    欢迎您,<%=o%> <a href="logout.jsp">退出</a>
    <div>
        <%
            Enumeration<String> e=request.getHeaderNames();
            while(e.hasMoreElements()){
                String k=e.nextElement();
                String v=request.getHeader(k);
                out.print("<h2>"+k+":"+v+"</h2>");
            }
        %>
    </div>--%>

</body>
</html>
